package net.lainiao.jwt.service;

import net.lainiao.jwt.bean.Account;
import net.lainiao.jwt.bean.Login;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2018/7/12.
 */
@Service
public class AccountService {
    public Integer checkAccount(Login account) {
        if (account != null && "lainiao".equals(account.getUsername()) && "lainiao".equals(account.getPassword())) {
            return 123456789;
        }
        return null;
    }

    public Account getAccountById(Integer accountId){
        if(accountId==123456789){
            Account account=new Account();
            account.setUsername("lainaio");
            account.setNickname("panda");
            account.setAge(30);
            account.setSex(1);
            return account;
        }
        return null;
    }
}
